﻿using System;

namespace Neitzel.Irc.Client
{
    /// <summary>
    /// EventArg that holds a IrcMessage
    /// </summary>
    public class ChannelUserEventArgs : EventArgs
    {
        public string Nickname { get; set; }
        public IrcChannel Channel { get; set; }
        public bool Joined { get; set; }
        public bool Left { get { return !Joined; } set { Joined = !value; } }

        /// <summary>
        /// Initializes a new instance of the DisplayMessageEventArgs class.
        /// </summary>
        public ChannelUserEventArgs()
        {
        }
        
        /// <summary>
        /// Initializes a new instance of the DisplayMessageEventArgs class.
        /// </summary>
        /// <param name="message">The Message that should be handled in the Event.</param>
        public ChannelUserEventArgs(DisplayMessage message)
            :base()
        {
            Message = message;
        }

        /// <summary>
        /// Gets or sets the IrcMessage that was received.
        /// </summary>
        public DisplayMessage Message { get; set; }
    }
}
